|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
| void | ADC10_A_ISR (void) |
| void ADC10_A_ISR | ( | void | ) |
Definition at line 151 of file adc10_a_ex4_signedData.c.
References __bic_SR_register_on_exit(), GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().
| void main | ( | void | ) |
ADC10_A - Sample A1 Input, Signed Data, LED ON if A1 > 0.5AVcc
MSP430F550x Demo A single sample is made on A0 with SIGNED reference to AVcc. Software sets ADC10SC to start sample and conversion - ADC10SC automatically cleared at EOC. ADC10_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC10_A conversion complete, ADC10_A_ISR will force exit from LPM0 in Mainloop on reti. If A1 > 0.5*AVcc, P1.0 set, else reset. To see the full extent of the negative conversion, add a watch to ADC_Result, and anything < 0.5&AVcc will be negative. Note, that a small change like +-1 voltage change ill result in large changes in this scenario because the least significant bits are 0.
MSP430F550x
-----------------
/|\| |
| | |
--|RST |
| P6.1/A1|<- Sample Signal
| P1.0|-> LED
| |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 72 of file adc10_a_ex4_signedData.c.
References __delay_cycles(), and __no_operation().